package br.com.gsa.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotEmpty;

@Entity
@Table(name="TASK", schema="APP")
@NamedQuery(
    name="findAllTask",
    query="SELECT t FROM Task t"
)
public class Task implements Serializable  {

	
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="id")
	private Long id;

	@Column(length=48)
	@NotEmpty
	@Size(max=48)
	private String description;

	public Task() {
		// TODO Auto-generated constructor stub
	}
	
	public Task(Long id, String description) {
		this.id = id;
		this.description = description;
	};
	
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
